$OpenBSD: patch-config-scripts_cups-sharedlibs_m4,v 1.10 2016/09/19 09:16:51 ajacoutot Exp $
--- config-scripts/cups-sharedlibs.m4.orig	Wed Sep 14 01:39:47 2016
+++ config-scripts/cups-sharedlibs.m4	Sat Sep 17 15:26:03 2016
@@ -33,14 +33,14 @@ if test x$enable_shared != xno; then
 			DSOFLAGS="$DSOFLAGS -Wl,-h\`basename \$@\` -G \$(OPTIM)"
 			;;
 		Linux | GNU | *BSD*)
-			LIBCUPS="lib$cupsbase.so.2"
-			LIBCUPSCGI="libcupscgi.so.1"
-			LIBCUPSIMAGE="libcupsimage.so.2"
-			LIBCUPSMIME="libcupsmime.so.1"
-			LIBCUPSPPDC="libcupsppdc.so.1"
+			LIBCUPS="lib$cupsbase.so.${LIBcups_VERSION}"
+			LIBCUPSCGI="libcupscgi.so.${LIBcupscgi_VERSION}"
+			LIBCUPSIMAGE="libcupsimage.so.${LIBcupsimage_VERSION}"
+			LIBCUPSMIME="libcupsmime.so.${LIBcupsmime_VERSION}"
+			LIBCUPSPPDC="libcupsppdc.so.${LIBcupsppdc_VERSION}"
 			DSO="\$(CC)"
 			DSOXX="\$(CXX)"
-			DSOFLAGS="$DSOFLAGS -Wl,-soname,\`basename \$@\` -shared \$(OPTIM)"
+			DSOFLAGS="$DSOFLAGS -shared \$(OPTIM)"
 			;;
 		Darwin*)
 			LIBCUPS="lib$cupsbase.2.dylib"
